home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 4097 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: mail2news.demon.co.uk!hpl3sn03.cern.ch
  2. From: Dan Pop <danpop@mail.cern.ch>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Question on argv
  5. Date: Thu, 1 Feb 1996 23:45:54 +0100
  6. Organization: CERN European Lab for Particle Physics
  7. Message-ID: <9602012245.AA05565@dxmint.cern.ch>
  8. References: <4eoq3c$45j@usenet.ucs.indiana.edu> <4epkmo$231@transfer.stratus.com> <TANMOY.96Feb1085901@qcd.lanl.gov>
  9. X-NNTP-Posting-Host: hpl3sn03.cern.ch
  10. X-Newsreader: NN version 6.5.0 #7 (NOV)
  11. X-Mail2News-Path: dxmint.cern.ch!hpl3sn03.cern.ch
  12.  
  13. tanmoy@qcd.lanl.gov (Tanmoy Bhattacharya) writes:
  14.  
  15. >In article <4epkmo$231@transfer.stratus.com> "David L. McReynolds"
  16. ><David_McReynolds@vos.stratus.com> writes: 
  17. ><snip>
  18. >   argv is an array of pointers to arrays of chars. Therefore
  19. >   you will have to do something like
  20. >
  21. >This is loose wording (but, then, even the standard makes exactly the
  22. >same mistake in at least one place). argv is an array of pointers to
  23. >the first elements of arrays of chars. (Pointers to arrays are
  24. >completely different beasts :-)
  25.  
  26. No way.  argv isn't (and _cannot_ be) an array at all.  It is a char **
  27. pointing to the first char * from an array of char pointers.
  28.  
  29. If anybody has doubts about this, sizeof argv should clear them up.
  30.  
  31. Dan
  32. -- 
  33. Dan Pop
  34. CERN, CN Division
  35. Email: danpop@mail.cern.ch 
  36. Mail:  CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland
  37.